# Maintainer: Jaroslav Lichtblau <svetlemodry@archlinux.org>
# Contributor: Sergej Pupykin <pupykin.s+arch@gmail.com>
# Contributor: Andrea Scarpino <andrea@archlinux.org>
# Contributor: Giovanni Scafora <giovanni@archlinux.org>
# Contributor: Alexander Fehr <pizzapunk@gmail.com>
# Contributor: Daniel J Griffiths <ghost1227@archlinux.us>

pkgname=poedit
epoch=1
pkgver=3.2.2
pkgrel=2
pkgdesc="Cross-platform gettext catalogs (.po files) editor"
arch=('loong64' 'x86_64')
url="https://www.poedit.net/"
license=('MIT')
depends=('gtkspell3' 'lucene++' 'wxwidgets-gtk3' 'webkit2gtk')
makedepends=('boost')
source=(https://github.com/vslavik/poedit/releases/download/v$pkgver-oss/poedit-${pkgver}.tar.gz)
sha256sums=('d87c1a80a885fd348a6d031bdc7daaa0aa5bc59922db564bef9c6dc49243cdde')

build() {
  cd ${pkgname}-${pkgver}

  ./configure --prefix=/usr --libexecdir=/usr/lib/poedit
  make CPPFLAGS+=' -DUCHAR_TYPE=uint16_t'
}

package() {
  cd ${pkgname}-${pkgver}

  make DESTDIR="${pkgdir}" install
  install -Dm644 COPYING "${pkgdir}"/usr/share/licenses/${pkgname}/LICENSE
}
